import { ipcRenderer } from 'electron';
window.addEventListener('DOMContentLoaded', () => {
  // 注入百度地图API
  const script = document.createElement('script')
  script.src = 'https://map.qq.com/api/gljs?v=1.exp&key=RK7BZ-AZOLZ-CQKXH-7PPVI-GOPKZ-HUFJI'
  script.async = true
  document.head.appendChild(script)
})
window.electron = {
  ipcRenderer,
  saveFile: (fileName: string, data: string) => ipcRenderer.invoke('save-file', fileName, data),
  onWinSize: (callback:any) => ipcRenderer.on('win-size', callback),
  closeWindow: () => ipcRenderer.send('close-window'),
  minimizeWindow: () => ipcRenderer.send('minimize-window'),
  maximizeWindow: () => ipcRenderer.send('maximize-window'),
 
};
